import 'package:json_annotation/json_annotation.dart';

part 'error_response.g.dart';

@JsonSerializable()
class ErrorResponse extends Object {
  @JsonKey(name: 'errorCode', defaultValue: '')
  String errorCode;

  @JsonKey(name: 'supportID', defaultValue: '')
  String supportID;

  @JsonKey(name: 'exception', defaultValue: '')
  String exception;

  ErrorResponse(
    this.errorCode,
    this.supportID,
    this.exception,
  );

  factory ErrorResponse.fromJson(Map<String, dynamic> srcJson) =>
      _$ErrorResponseFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ErrorResponseToJson(this);
}
